package com.rtp.transformer.fin.client;

import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Query extends Sink {

	private GLFlexTable gl=new GLFlexTable();
	 public void onShow() {
		 gl.update();
	  }
	public Query() {

		final VerticalPanel panel = new VerticalPanel();
		initWidget(panel);
		panel.setWidth("100%");

		final TabPanel tabPanel = new TabPanel();
		panel.add(tabPanel);
		tabPanel.setWidth("100%");
 
		tabPanel.add(gl, "General Ledger");
 

		final VerticalPanel bl = new VerticalPanel();
		tabPanel.add(bl, "Buy Item");

		final VerticalPanel bpi = new VerticalPanel();
		tabPanel.add(bpi, "Buy Pay Item");

		final VerticalPanel si = new VerticalPanel();
		tabPanel.add(si, "Sales Item");

		final VerticalPanel sri = new VerticalPanel();
		tabPanel.add(sri, "Sales Return Item");
		tabPanel.selectTab(0);
	}

	public static SinkInfo init(Images images) {
		// TODO Auto-generated method stub
		return new SinkInfo("Query","<h2>Query function</h2>"
				+ "<p>Gao Wen can query the history report via this interface. "
				+ "</p><p>The data will be kept into fin database as report data source. "
				+ "</p>"){

			 
			public Sink createInstance() {
				// TODO Auto-generated method stub
				return new Query();
			}
			
		};
	}

}
